<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

/**
 * V1 路由组
 *  需验证登录的 路由组 login
**/
Route::group('v1',function (){

    Route::get('admin/login_verify','login.Index/get_verify');//登录验证信息
    Route::post('admin/login','login.Index/admin_login')->token('adminLogin');//登录

    //需验证登录
    Route::group('login',function (){

        Route::get('admin/logout','login.Index/logout');//管理员登出

        //用户菜单
        Route::get('get/menu','home.Index/get_menu');//后台菜单
        Route::get('get/get_data_index','home.Index/get_data_in_index'); //首页统计数据
        Route::post('upload/images','home.Index/user_upload_img');//图片上传

        //后台系统操作
        Route::get('sys/role/list','sys.Role/role_list'); //角色列表
        Route::post('sys/role/add','sys.Role/role_add'); //角色添加修改
        Route::post('sys/role/role_auth_add','sys.Role/role_auth_add'); //角色授权添加修改
        Route::get('sys/role/role_arr','sys.Role/role_arr'); //获取角色数组（id,name）

        Route::get('sys/admin/list','sys.Admin/admin_list'); //管理员列表
        Route::post('sys/admin/add','sys.Admin/admin_add'); //管理员添加
        Route::get('sys/admin/admin_arr','sys.Admin/admin_arr'); //管理员数组 用于用户管理 添加 客服归属

        Route::get('sys/rule/list','sys.Rule/rule_list'); //权限菜单员列表
        Route::post('sys/rule/add','sys.Rule/rule_add'); //权限菜单添加
        Route::get('sys/rule/rule_arr','sys.Rule/rule_arr'); //权限菜单多维二级数组 用于菜单添加选择
        Route::get('sys/rule/role_rule_arr','sys.Rule/role_rule_arr'); //全部菜单 递归分类

        //用户管理/用户分类
        Route::get('user/user_cate/list','user.UserCate/cate_list'); //用户分组列表
        Route::post('user/user_cate/add','user.UserCate/cate_add'); //用户分组添加/编辑
        Route::get('user/user_cate/cate_arr','user.UserCate/cate_arr'); //用户分组数组信息

        Route::get('user/user/list','user.User/user_list'); //用户列表
        Route::post('user/user/add','user.User/user_add'); //用户添加/编辑

        //文章管理/文章分类
        Route::get('article/article_cate/list','article.ArticleCate/cate_list'); //文章分类列表
        Route::post('article/article_cate/add','article.ArticleCate/cate_add'); //文章分类添加/编辑
        Route::get('article/article_cate/cate_arr','article.ArticleCate/cate_arr'); //文章分类数组信息

        Route::get('article/article/list','article.Article/article_list'); //文章列表
        Route::post('article/article/add','article.Article/article_add'); //文章添加/编辑



    })->middleware(\app\admin\middleware\JwtAuth::class);

});

